package com.biz.primus.ms.customercenter.feign.member;

import com.biz.primus.base.vo.PageResult;
import com.biz.primus.model.oms.vo.*;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author jun.liu
 * @usage
 * @reviewer
 * @since 2017年11月3日
 */
@FeignClient(qualifier = "omsFeignClient", name = "service-oms")//, fallback = DegradedMemberFeignClient.class)
public interface OmsFeignClient {

    @PostMapping("soa/oms/getOrderHistoryByUserId")
    @ApiOperation("根据会员ID查询历史订单信息")
    OmsOrderHistoryVo getOrderHistoryByUserId(@RequestBody OrderQueryVo orderQueryVo);

    @PostMapping("soa/oms/getOrderProductByUserId")
    @ApiOperation("根据会员ID查询历史订单商品")
    PageResult<OmsHistoryOrderProductVo> getOrderProductByUserId(@RequestBody OrderQueryVo orderQueryVo);

    @PostMapping("soa/oms/getOrderByUserId")
    @ApiOperation("根据用户ID分页查询订单列表")
    PageResult<OmsOrderVo> getOrderByUserId(@RequestBody OrderQueryVo orderQueryVo);

    @GetMapping("soa/oms/getOrderDetail")
    @ApiOperation("获取订单详情信息")
    OmsOrderRespVo getOrderDetail(@ApiParam(value = "订单编码", required = true) @RequestParam("orderCode")
                                          String orderCode);
}
